-- GENERATED SPELL FOR [Knight of the Ebon Blade] --


function spell0_31094(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(52374,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31094', 626, 1)
end

function spell1_31094(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(52375,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31094', 572, 1)
end

function spell2_31094(pUnit, Event) --@Death Grip,n/a--
pUnit:FullCastSpellOnTarget(57602,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31094', 0, 1)
end

function spell3_31094(pUnit, Event) --@Icy Touch,n/a--
pUnit:FullCastSpellOnTarget(52372,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31094', 20000, 1)
end

function spell4_31094(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(52373,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31094', 12000, 1)
end

function Sorts_31094(pUnit, Event)
local choix_sorts_31094 = math.random(0, 4)
if choix_sorts_31094 == 0 then
pUnit:RegisterEvent('spell0_31094', 1, 1)
end
if choix_sorts_31094 == 1 then
pUnit:RegisterEvent('spell1_31094', 1, 1)
end
if choix_sorts_31094 == 2 then
pUnit:RegisterEvent('spell2_31094', 1, 1)
end
if choix_sorts_31094 == 3 then
pUnit:RegisterEvent('spell3_31094', 1, 1)
end
if choix_sorts_31094 == 4 then
pUnit:RegisterEvent('spell4_31094', 1, 1)
end
end

function mob31094_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31094', math.random(1500, 3000), 1)
end

function mob31094_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31094_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31094_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31094, 1, 'mob31094_Action')
RegisterUnitEvent(31094, 2, 'mob31094_Leave')
RegisterUnitEvent(31094, 3, 'mob31094_Kill')
RegisterUnitEvent(31094, 4, 'mob31094_Die')
